package com.tourism.dao;

import com.tourism.entity.OrderInfo;
import com.tourism.entity.OrderPayInfo;
import com.tourism.entity.OrderQuery;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Description 订单dao
 * @Author z
 * @Date 2021-04-18 17:00
 */
@Mapper
public interface OrderInfoDao {
    /**
     * 新增订单
     *
     * @param orderInfo
     * @return
     */
    boolean addOrderInfo(OrderInfo orderInfo);

    /**
     * 根据id查找订单
     *
     * @param id
     * @return
     */
    OrderInfo getOrderInfoById(Long id);

    /**
     * 根据id删除订单
     *
     * @param id
     * @return
     */
    Boolean deleteOrderInfoById(Long id);


    /**
     * 获取订单列表
     *
     * @param query
     * @return
     */
    List<OrderInfo> getOrderInfoList(OrderQuery query);
    /**
     * 更新支付状态
     *
     * @param orderPayInfo
     * @return
     */
    boolean updateOrderPayInfo(OrderPayInfo orderPayInfo);
}
